﻿
 function Time()
    {
        today = new Date();
        var hours = today.getHours();
        var Message;
        if(parseInt(hours)>=0&&parseInt(hours)<=11)
        {
            Message="早上好!";
            return Message;
        }
        else if(parseInt(hours)>11&&parseInt(hours)<=13)
        {
            Message="中午好!";
            return Message;				
        }
        else if(parseInt(hours)>13&&parseInt(hours)<=17)
        {
            Message="下午好!";
            return Message;	
        }
        else if(parseInt(hours)>17)
        {
            Message="晚上好!";
            return Message;	
        }
    }
